package com.bookmanage.mapper;

import com.bookmanage.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
//    @Select("SELECT * FROM USER WHERE username = #{username}")
        User getUserByUsername(@Param("username") String username,@Param("password") String password);


//    @Insert("INSERT INTO USER(username,password,email) VALUES(#{username},#{password},#{email})")
    int addUser(User user);
//    @Update("UPDATE USER SET password = #{password}, email = #{email} WHERE id = #{id}")
    int updateUser(User user);
//    @Select("SELECT * FROM USER WHERE id = #{id}")
    User getUserById(@Param("id") Integer id);
}
